﻿using System;

class ShipDamage
{
    static void Main(string[] args)
    {
        System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;

        int ShipX1 = int.Parse(Console.ReadLine());
        int ShipY1 = int.Parse(Console.ReadLine());
        int ShipX2 = int.Parse(Console.ReadLine());
        int ShipY2 = int.Parse(Console.ReadLine());
        int HorizonY = int.Parse(Console.ReadLine());
        int CatapultX1 = int.Parse(Console.ReadLine());
        int CatapultY1 = int.Parse(Console.ReadLine());
        int CatapultX2 = int.Parse(Console.ReadLine());
        int CatapultY2 = int.Parse(Console.ReadLine());
        int CatapultX3 = int.Parse(Console.ReadLine());
        int CatapultY3 = int.Parse(Console.ReadLine());

        int CatapultHitY1;
        if (HorizonY > CatapultY1)
        {
            CatapultHitY1 = HorizonY + (Math.Max(HorizonY, CatapultY1) - Math.Min(HorizonY, CatapultY1));
        }
        else
        {
            CatapultHitY1 = HorizonY - (Math.Max(HorizonY, CatapultY1) - Math.Min(HorizonY, CatapultY1));
        }

        int CatapultHitY2;
        if (HorizonY > CatapultY2)
        {
            CatapultHitY2 = HorizonY + (Math.Max(HorizonY, CatapultY2) - Math.Min(HorizonY, CatapultY2));
        }
        else
        {
            CatapultHitY2 = HorizonY - (Math.Max(HorizonY, CatapultY2) - Math.Min(HorizonY, CatapultY2));
        }

        int CatapultHitY3;
        if (HorizonY > CatapultY3)
        {
            CatapultHitY3 = HorizonY + (Math.Max(HorizonY, CatapultY3) - Math.Min(HorizonY, CatapultY3));
        }
        else
        {
            CatapultHitY3 = HorizonY - (Math.Max(HorizonY, CatapultY3) - Math.Min(HorizonY, CatapultY3));
        }


        double shipDamage = 0;

        //hits 
        if (Math.Max(ShipX1,ShipX2) >= CatapultX1 && Math.Min(ShipX1,ShipX2) <= CatapultX1
            && Math.Max(ShipY1, ShipY2) >= CatapultHitY1 && Math.Min(ShipY1, ShipY2) <= CatapultHitY1)
        {
            if (
                (ShipX1 == CatapultX1 && (ShipY1 == CatapultHitY1)) || 
                (ShipX2 == CatapultX1 && (ShipY2 == CatapultHitY1)) || 
                (ShipX1 == CatapultX1 && (ShipY2 == CatapultHitY1)) || 
                (ShipX2 == CatapultX1 && (ShipY1 == CatapultHitY1))
               ) // corners
            {
                shipDamage += 0.25;
            }
            else if(
                    (ShipX1 == CatapultX1) || (ShipX2 == CatapultX1) ||
                    (ShipY1 == CatapultHitY1) || (ShipY2 == CatapultHitY1) 
                   ) // sides
            {
                shipDamage +=0.5;
            }
            else // inside
            {
                shipDamage +=1;
            }
         }

        if (Math.Max(ShipX1, ShipX2) >= CatapultX2 && Math.Min(ShipX1, ShipX2) <= CatapultX2
            && Math.Max(ShipY1, ShipY2) >= CatapultHitY2 && Math.Min(ShipY1, ShipY2) <= CatapultHitY2)
        {
            if (
                (ShipX1 == CatapultX2 && (ShipY1 == CatapultHitY2)) ||
                (ShipX2 == CatapultX2 && (ShipY2 == CatapultHitY2)) ||
                (ShipX1 == CatapultX2 && (ShipY2 == CatapultHitY2)) ||
                (ShipX2 == CatapultX2 && (ShipY1 == CatapultHitY2))
               ) // corners
            {
                shipDamage += 0.25;
            }
            else if (
                    (ShipX1 == CatapultX2) || (ShipX2 == CatapultX2) ||
                    (ShipY1 == CatapultHitY2) || (ShipY2 == CatapultHitY2)
                   ) // sides
            {
                shipDamage += 0.5;
            }
            else // inside
            {
                shipDamage += 1;
            }
        }

        if (Math.Max(ShipX1, ShipX2) >= CatapultX3 && Math.Min(ShipX1, ShipX2) <= CatapultX3
            && Math.Max(ShipY1, ShipY2) >= CatapultHitY3 && Math.Min(ShipY1, ShipY2) <= CatapultHitY3)
        {
            if (
                (ShipX1 == CatapultX3 && (ShipY1 == CatapultHitY3)) ||
                (ShipX2 == CatapultX3 && (ShipY2 == CatapultHitY3)) ||
                (ShipX1 == CatapultX3 && (ShipY2 == CatapultHitY3)) ||
                (ShipX2 == CatapultX3 && (ShipY1 == CatapultHitY3))
               ) // corners
            {
                shipDamage += 0.25;
            }
            else if (
                    (ShipX1 == CatapultX3) || (ShipX2 == CatapultX3) ||
                    (ShipY1 == CatapultHitY3) || (ShipY2 == CatapultHitY3)
                   ) // sides
            {
                shipDamage += 0.5;
            }
            else // inside
            {
                shipDamage += 1;
            }
        }



        Console.WriteLine("{0:0%}",shipDamage);

    }
}
